#pragma  once

#include "Common.h"
#include "organ/MasterControl.h"
#include "communication/serial/AsyncSerial.h"
#include "conf/Config.h"
#include "communication/session/OrganSession.h"

class CloudCtrler:public MasterControl
{
private:
	OrganSession m_socket;
	ConfigFile  m_config;
public:
	CloudCtrler(Assembler* pAssm);
	virtual ~CloudCtrler();
	virtual  ErrorCode Init();

	void  OnReady(uint32 ready );
	ErrorCode PushData(char* pData, uint32 nLen) ;
	ErrorCode OnReceive(DataPacket& pack) ;

	ErrorCode Update(uint32 dtTime);
};